The station is located on the summit (plateau) of the second highest point of the Hoggar mountain range in the Saharan desert. The site is very remote at a distance of 50 km from Tamanrasset. Touristic activities in the area are limited due to difficult access to a few dozen visitors per day. Vegetation is extremely sparse.
#from IPython.display import IFrame
#IFrame(src='https://www.youtube.com/embed/ncfcqfDkO1E', width='100%', height='540')
from fbprophet import *
import pandas as pd
import datetime
import plotly.offline as py
import seaborn as sns; sns.set()
import plotly.graph_objs as go
import matplotlib.pyplot as plt
def forecasting(gas_name, gas_code, months, unit):
gas_data = pd.read_table('C:/Users/Taha/Desktop/algeria_ghg/'\
+gas_code+'_ask_surface-flask_1_ccgg_month.txt',
sep='\s{1,}', names=['stations','year','month','y'], engine='python')
gas_data['ds'] = pd.to_datetime(gas_data[['year', 'month']].assign(DAY=1))
fig0 = go.Figure()
fig0.add_trace(go.Scatter(x=gas_data.ds, y=gas_data.y, mode='lines', name='Optimizer'))
fig0.update_layout(title=gas_name+'<br>Measurements', xaxis_title='Time', width=900,
yaxis_title='Parts per '+unit+'illion (PP'+unit+')')
fig0.show()
model = Prophet(weekly_seasonality=False, daily_seasonality=False)
model.set_auto_seasonalities
model.add_seasonality(name='monthly', period=30, fourier_order=5)
model.fit(gas_data)
future = model.make_future_dataframe(periods=months,freq='M')
forecast = model.predict(future)
py.init_notebook_mode()
fig1 = plot.plot_plotly(model, forecast)
fig1.update_layout(title=str(gas_name)+' Forecast', xaxis_title='Time',
yaxis_title='Parts per '+unit+'illion (PP'+unit+')')
py.iplot(fig1)
fig2 = plot.plot_components_plotly(model, forecast)
fig2.update_layout(title=str(gas_name)+'<br>Trend & Seasonality', height=500)
py.iplot(fig2)
'''
Measurements are reported in units of
micromol/mol (10^-6 mol CO2 per mol of dry air or parts per
million (ppm)). Measurements are directly traceable to the
WMO X2007 CO2 mole fraction scale.
'''
forecasting('Carbon Dioxide', 'co2', 240, 'M')
'''
Measurements are reported in units of nanomol/mol
(10^-9 mol CH4 per mol of dry air (nmol/mol) or parts per billion
(ppb)) relative to the NOAA 2004A CH4 standard scale.
'''
forecasting('Methane', 'ch4', 240, 'B')
'''
Carbon monoxide mixing ratios in these files are reported
in units of nmol/mol (10^-9 mole CO per mole of dry air
or as part per billion by mole fraction (ppb)) relative
to the NOAA/WMO CO scale (Novelli et al., 1991, Novelli
et al., 2003).
'''
forecasting('Carbon Monoxide', 'co', 240, 'B')
forecasting('Molecular Hydrogen', 'h2', 240, 'B')
'''
N2O measurements are reported in units of nanomol/mol (10^-9 mol N2O
per mol of dry air (nmol/mol) or parts per billion (ppb)) relative
to the NOAA 2006A N2O standard scale.
'''
forecasting('Nitrous Oxide', 'n2o', 240, 'B')
'''
SF6 measurements are reported in units of picomol/mol (10^-12 mol
SF6 per mol of dry air (pmol/mol) or parts per trillion (ppt))
relative to the NOAA 2014 SF6 standard scale.
'''
forecasting('Nitrous Oxide', 'sf6', 240, 'T')
Dlugokencky, E.J., J.W. Mund, A.M. Crotwell, M.J. Crotwell, and K.W. Thoning (2019), Atmospheric Carbon Dioxide Dry Air Mole Fractions from the NOAA ESRL Carbon Cycle Cooperative Global Air Sampling Network, 1968-2018, Version: 2019-07, https://doi.org/10.15138/wkgj-f215